package com.coincalf.exchange.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.coincalf.exchange.entity.ForexOpenPositionOrder;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 * 开仓订单信息 Mapper 接口
 * </p>
 *
 * @author qiang
 * @since 2018-05-12
 */
public interface ForexOpenPositionOrderMapper extends BaseMapper<ForexOpenPositionOrder> {

    /**
     * 平仓修改开仓信息
     * @param openId 开仓单号
     * @param returnMargin 返回保证金
     * @param closeVolume 平仓量
     * @param status 状态
     */
    int closePosition(@Param("openId") long openId,
                      @Param("returnMargin")  BigDecimal returnMargin,
                      @Param("closeVolume") BigDecimal closeVolume,
                      @Param("status") int status);
}
